package leaf.cloud.common.core.enums;

/**
 * 返回码定义
 */
public enum ReturnCode {
    SUCCESS(200, "操作成功"),
    EMPTY(201, "资源为空"),
    FAIL(600, "操作失败"),
    TOKEN_EXPIRE(401, "长时未使用系统，请重新登录"),
    REQUEST_METHOD_ERROR(403, "当前接口不支持此请求方式!"),
    SERVER_ERROR(500, "请求无法处理,请稍后再试!"),
    UPDATE_IMAGE_FAIL(555,"更新图片失败"),
    NOT_ALLOWED_DELETE(601, "不符合删除条件"),
    PARAMETER_ERROR(602, "参数异常"),
    NO_DEFAULT_ERROR(603, "需选择一个类型默认显示!"),
    DATA_ERROR(606, "数据异常,请联系管理员!"),
    notAllowedUpdate(603, "不符合修改条件"),
    NAME_REPEAT(604, "名称重复"),
    NOT_IMPLEMENTED(605, "暂未实现"),
    name_repeat(100001, "名称重复"),
    data_not_null(100002, "参数不能为空"),
    password_not_true(100003, "密码不正确"),
    REPEAT_PASSWORD_NOT_TRUE(100067, "两次输入密码不一致"),
    object_not_exit(100004, "对象不存在"),
    object_exited(100005, "对象已存在"),
    IS_EXCEPTION(150003,"该单据已异常挂起，请勿提交!"),
    object_not_exit_data_exception(100006, "单据已不在此状态，请刷新页面！【对象不存在】"),
    OREDER_NOT_EXIT(100099, "请输入正确的打版单号！"),
    codeStateNotExit(100007,"当前单据状态不存在，请刷新页面"),
    PERMISSION_SIGNATURE_ERROR(1001, "签名失败"),
    USER_INEXISTENCE(1002, "用户不存在"),
    USER_INFO_ERROR(1003, "用户名或密码错误"),
    CAPTCHA_ERROR(1004, "验证码错误"),
    CLIENT_AUTHENTICATION_FAILED(1005, "客户端认证失败"),
    ACCESS_UNAUTHORIZED(1006, "访问未授权"),
    ROLE_CODE_EXIT(100006, "角色code重复"),
    INVALID_OPERATING(100007, "无效的操作"),
    USER_NAME_EXIT(100008, "用户名已存在"),
    USER_DOES_NOT_EXIST(100009, "用户不存在"),
    POSITION_REPEAT(100010, "职位名称已存在"),
    notAllowedDeleteEnterprise(100011, "在组织机构管理中已存在组织机构数据，不允许删除！如需删除，请先删除组织机构管理中的相应组织！"),
    DELETE_ORGANIZATIONAL_HAVE_CHILDREN(100012, "组织下有子组织，不允许删除！如需删除请先删除子组织信息！"),
    DELETE_ORGANIZATIONAL_HAVE_PERSONNEL(100013, "组织下有员工信息，不允许删除！如需删除，请先删除组织下员工信息！"),
    DUTY_NAME_EXITED(100014, "岗位名称重复"),
    USER_DOES_FROZEN(100015, "用户已冻结"),
    SQL_SYNATX_ERROE(100016, "sql语句解析错误"),
    ENTERPRISE_EXIT(100017, "企业已存在，请使用更新接口"),
    ENTERPRISE_NAME_EXIT(100017, "企业名称重复"),
    ENTERPRISE_CODE_EXIT(100018, "企业编码重复"),
    ENTERPRISE_NUMBER_EXIT(100019, "企业编号重复"),
    NOT_ALLOWED_DELETE_APP_FUNCTION(100020, "该菜单存在下级菜单，不允许删除！"),
    USER_NAME_REPEAT(100021, "用户名重复"),
    MOBILE_NUMBER_REPEAT(100022, "手机号重复"),
    EMAIL_REPEAT(100023, "邮箱重复"),
    ORG_DUTY_GROUP_REPEAT(100024, "岗位组名称已存在"),
    ORG_DUTY_REPEAT(100025, "岗位名称已存在"),
    FIRST_CHOOSE_ORGANIZATIONAL(100026, "请先选择组织，在选择职位"),
    NOT_ALLOWED_DELETE_TAGS(100027, "不允许删除标签"),
    PAGE_IS_ALREADY_BOUND(100028, "页面已经被绑定"),
    APP_FUNCTION_REPEAT(100029, "应用功能名称重复"),
    CAN_NOT_CHOOSE_YOURSELF(100030, "不能选择自己作为父级"),
    CAN_NOT_CHOOSE_OWN_SUBORDINATE(100031, "不能选择子级作为父级"),
    USER_GROUP_NAME_REPEAT(100032, "用户组名称重复"),
    ENTERPRISE_IS_DISABLE(100033, "企业被禁用"),
    DATA_SET_NOT_DELETE(100034, "数据集下存在数据项,无法删除!"),
    CHOOSE_DATA_VALUE(100035, "请选择权限对象值!"),
    DATA_SET_DELETE(100036, "数据集下存在数据数据权限配置,无法删除!"),
    DATA_ITEM_DELETE(100037, "数据项下存在数据数据权限配置,无法删除!"),
    APP_NAME_REPEAT(100038, "应用名称重复"),
    APP_CODE_REPEAT(100039, "应用编码重复"),
    APP_PAGE_NAME_REPEAT(100040, "页面名称重复"),
    APP_PAGE_ROUTE_REPEAT(100041, "页面路由重复"),
    USER_GROUP_NAME_TOO_LONG(100041, "用户组名称超出长度"),
    PAGE_COMPONENT_NAME_REPEAT(100042, "组件名称重复"),
    PAGE_COMPONENT_CODE_REPEAT(100043, "组件编码重复"),
    PAGE_BUTTON_NAME_REPEAT(100044, "按钮名称重复"),
    PAGE_BUTTON_CODE_REPEAT(100045, "按钮编码重复"),
    NOT_ALLOWED_UPDATE_APP_STATUS(100046, "该系统存在用户有这个应用的权限，不能禁用"),
    UPDATE_PAGE_USER_STATUS(100047, "如果继续将对“已绑定该页面”的“用户信息”进行清除。"),
    UPDATE_PAGE_ROLE_STATUS(100048, "如果继续将对“已绑定该页面”的“角色信息”进行清除。"),
    UPDATE_FUNCTION_USER_STATUS(100049, "如果继续将对“已绑定该应用功能”的“用户信息”进行清除。"),
    UPDATE_FUNCTION_ROLE_STATUS(100050, "如果继续将对“已绑定该应用功能”的“角色信息”进行清除。"),
    CAN_NOT_CHOOSE_YOURSELF_LEADER(100051, "不能选择自己作为上级领导"),
    DELETE_DUTY_GROUPS_HAVE_CHILDREN(100052, "存在下级岗位组,不允许删除! 如需删除,请先删除下级岗位组"),
    DELETE_DUTY_GROUPS_HAVE_DUTY(100053, "存在岗位,不允许删除! 如需删除,请先删除岗位组下岗位"),
    MUST_ONE_CHOOSE(100054, "至少有个一首选供应商"),
    ALREADY_HAVE_ONE_CHOOSE(100066, "已有一个首选供应商，请重新选！"),
    MUST_ONE_COLOR_CARDS(100059, "物料分类为面料，请上传色卡!"),
    ID_NOT_NULL(100055, "id不能为空"),
    IMAGE_ONE_CHOOSE(100056, "至少有个一主图"),
    DELETE_FAIL(100057, "删除不成功，请先将该分类对应的子分类删除后，再删除！"),
    DELETE_FAIL_PROCESS_REFERENCED(100058, "删除不成功，当前工艺正在被引用！"),
    SUPPLIER_IS_NULL(100059, "找不到对应的供应商信息"),

    MOBILE_NOT_EXISTS(1000100, "手机号不存在"),
    MOBILE_ERROR(1000101, "手机验证码错误"),
    EMAIL_NOT_EXISTS(1000102, "邮箱不存在"),
    MOBILE_REPEAT_SEND(1000103, "手机验证码已经发送，请不要重复操作"),
    MAIL_REPEAT_SEND(1000104, "邮箱验证码已经发送，请不要重复操作"),
    EMAIL_ERROR(1000105, "邮件验证码错误"),

    GROUP_IDENTIFICATION_REPEAT(100100, "组标识重复"),
    GROUP_NAME_REPEAT(100101, "组名重复"),
    DICTIONARY_VALUE__REPEAT(100102, "字典标识不能重复"),
    SUPPLIER_ADDRESS_IS_NULL(100103, "供应商地址不能为空"),
    GATE_ADDRESS_IS_NULL(100104, "档口信息不能为空"),
    SHOP_IS_NULL(100105, "店铺信息不能为空"),
    RETURN_ADDRESS_IS_NULL(100106, "退货地址信息不能为空"),
    SUPPLIER_GATE_ADDRESS_IS_NULL(100107, "供应商地址或档口信息不能为空"),
    NOT_ALLOWED_RETURN(100108, "不符合撤回条件"),
    NOT_ALLOWED_RETURN_TWO(100113, "下一环节单据已提交，无法撤回"),
    NOT_NULL_PICTURE_ATTACHMENT(100109, "图片附件不能为空！"),
    NOT_NULL_REVIEW_RESULTS(100110, "审版结果不能为空！"),
    NOT_NULL_BASIC_INFORMATION(100111, "版单基本信息不能为空！"),
    NOT_NULL_FRONT_PAGE_SIZE_INFORMATION(100112, "头版尺寸信息不能为空！"),
    NOT_NULL_DATA_INFORMATION(100112, "找不到符合的数据，请检查！"),
    GROUP_NAME_EXIST_NAME(100101, "在数据字典已存在组名或值或名称相同，请检查！"),
    COLOR_CODE_NOT_NULL(100060, "SKU颜色不能为空"),
    ONLY_ONE_SPU(100061, "只能操作同一个款号的数据!"),
    COMMIT_EXIST_REPEAT_MATERIAL_ITEM(100062, "版单下的物料有重复的物料项目类型，请核对!"),
    EXIST_REPEAT_MATERIAL_ITEM(100062, "版单下的物料检查到已存在重复物料项目类型，请核对!"),
    DESIGNER_REQUIRED(100063, "设计师不能为空，请选择设计师！"),
    FinishedSubstrateStateError(100064,"不能传汉字[成品料/底料]，必须要传它们对应的字典值!"),
    ItemMismatch(100064,"二次工艺清单与打版颜色物料清单的物料项目存在不匹配情况，请核查！"),
    NOT_FIND_PRODUCT(1000065, "找不到产品信息"),
    NOT_FIND_MATERIAL_BOM_LIST(1000066, "找不到物料BOM清单信息，数据有误！"),
    SECONDARY_PROCESS_BIND(150000, "该二次工艺已有花稿"),
    SECONDARY_PROCESS_MATERIAL_ITEM(150001,"找不到对应的BOM单物料"),

    MATERIAL_LIST_NOT_FOUND(150002,"当前订单未查询到大货核价信息,请联系管理员处理!"),
    DELIVERY_DAY_NOT_FOUND(150003,"无交期天数,暂时无法发起接单异议!"),
    CONFIG_DESIGNER_BUYER_RELATIONSHIP_NOT_EXIT(160001, "该设计师没有绑定对应面料采购员,无法提交,请联系管理员处理!"),
    MD_COMBINATION_PROCESS_IS_NULL(150004, "组合工艺工艺为空，请维护！"),
    PROCESS_COMPLETE_NODE(200000, "该节点已经完成，无需再次提交！"),
    PROCESS_NODE_CONDITION(200001, "节点条件设置错误！"),
    PROCESS_RELEASE_PROCESS(200002, "发布业务流程失败！"),
    PROCESS_PREMISENODE(200003, "前置节点状态错误！"),
    PROCESS_TRAILNODE(200004, "后置节点状态错误！"),
    PROCESS_TURN_DOWN(200005, "请选择正确的节点驳回！"),
    PROCESS_REPEATED_SUBMIT(200006, "请勿重复提交！"),
    PROCESS_NOT_EXIST(200007, "该业务流程不存在！"),
    PROCESS_NODE_NOT_EXIST(200008, "该业务流程节点不存在！"),
    PROCESS_COMPLETE(200009, "该流程已完成！"),
    PROCESS_FIRST_NODE(200010, "请选择首节点进行初始化！"),
    PROCESS_CREATING_TEMPLATE_ERROR(200010, "创建模板错误！"),
    PROCESS_HISTORY_RECORD_NOT_EXIST(200011, "该流程没有历史记录！"),
    PROCESS_NODE_TYPE_NOT_EXIST(200012, "该类型的流程节点不存在！"),
    PROCESS_NODE_CONDITION_NOT_EXIST(200013, "获取节点条件错误！"),
    PROCESS_TEMPLATE_NOT_EXIST(200014, "该业务流程模板不存在，请检查文件！"),
    PROCESS_TURN_DOWN_FAIL(200015, "请选择正确的节点驳回！"),
    PROCESS_RECALL_FAIL(200016, "请选择正确的节点撤回！"),

    PROCESS_AGENCY_COMPLETE(201000, "代办任务已经完成，无需再次提交！"),
    PROCESS_AGENCY_TASK_NOT_EXIST(201001, "代办任务不存在！"),
    PROCESS_AGENCY_USER_NOT_MATCH(201002, "代办任务执行人不匹配！"),
    PROCESS_AGENCY_ERROR(201003, "审批业务异常！"),
    PROCESS_AGENCY_TEMPLATE_NOT_EXIST(201004, "审批业务流程模板不存在，请检查文件！"),
    PROCESS_AGENCY_HANDLECODE_NOT_EXIST(201005, "审批业务流程处理类型不能为空！"),
    PROCESS_AGENCY_NOT_COMPLETE(201006, "审批业务子流程存在未完成！"),

    NOT_MATERIAL_FLOW_NODE_CONFIG(300001, "找不到物料流程节点配置信息！"),
    NOT_FOUND_MATERIAL_NODE(300002, "找不到物料流程配置数据，请联系管理员！"),
    PLATE_AT_LEAST_CLOTHES_COLOR(300002, "请至少选择一个打版颜色"),
    PROCESS_CONFIG_ERROR(300003, "找不到对应的工作流模板"),
    OVERPRINT_PLATE_ORDER_NOT_EXISTED(300004, "该被套款查无相应打版单或对应的打版单已被取消或终止，暂不能发起套版"),
    OVERPRINT_PRODUCT_NOT_EXISTED(300005, "该被套款找不到对应商品资料"),
    OVERPRINT_SIZEGROUP_EXISTED(300006, "尺码组不相同不能发起套版"),


    ORDER_LINK_CONFIG_ERROR(400001, "找不到单据环节配置"),
    ORDER_LINK_RECORD_REEOR(400002, "找不到单据当前环节记录数据"),
    ORDER_LINK_RECORD_REPEAT_COMMIT_REEOR(400003, "该节点已提交,无需重复提交"),
    ORDER_LINK_RECORD_REEOR_NOT_START(400004, "该节点还未开始"),
    ORDER_LINK_RECORD_REEOR_NOT_ALREADY_WITHDRAW(400005, "该单据已被撤回，无法提交，如果信息修改请点击保存暂存数据"),

    POM_PLANNER_NOT_EXIST(500001, "采购员不存在！"),
    POM_ASSIGN_PLANNER_REPEAT(500002, "已分配采购员，请勿重复提交！"),
    STYLIST_PROCESSING_FACTORY_ERROR(500003, "该加工厂找不到对应的花稿设计师配置"),
    POM_STOCKUPQTY_ZERO(500004, "采购数量不能为0"),
    POM_PLANNER_NOT_CONFIG(500005, "没有配置计划员"),
    POM_SPU_NOT_EXIST(500006, "无法备货,此款商品不存在！"),
    POM_COLOR_NOT_EXIST(500007, "无法备货,此款商品缺少 "),
    POM_PLAN_ORDER_NOT_EXIST(500008, "采购计划单不存在！"),
    POM_PLAN_ORDER_DETAIL_NULL(500009, "采购颜色不能为空！"),
    POM_RECEIPT_PLACE_NOT_EXIST(500010, "收货地址不存在！"),
    POM_PLAN_ORDER_DETAIL_NOT_EXIST(500011, "采购计划明细不存在！"),
    POM_PLAN_ORDER_STOCK_UP_FINISH(500012, "计划单已备货，请勿重复操作！"),
    POM_PLAN_ORDER_CAN_NOT_REVOKE(500013, "单据已加色，无法撤回！"),
    POM_EXCEPTION_CREATE_FAILED(500014,"异常单生成失败"),
    POM_SKU_NOT_EXIST(500015,"商品SKU不存在，不能提交备货（无法推送到ERP）"),
    POM_PLAN_ORDER_INFRANT_MOTHER(500016,"产品分类【母婴】不能提交备货单！"),
    POM_SYNC_ERP_ERROR(500017,"同步ERP失败"),
    POM_CANT_UPDATE_RECEIPT_PLACE(500018,"非待确认备货状态，无法修改收货地点"),
    POM_PLAN_ORDER_PRICE_SYNC_OPMALL_FAILED(500018,"OPMALL价格评审失败"),

    /**
     * pms
     */
    PMS_SUBMITORDER_NOT_SUPPLIER(600001, "同一个供应商的需求才能批量提交"),
    PMS_GOODSSOURCE_HAVE_DEFAULT(600002, "已有默认货源"),
    PMS_BATCH_NOT_ADDRESS(600003, "没有获取到零采批次的收货地址"),
    PMS_GOODSSOURCE_URL_INVALID(600003, "货源链接失效"),
    PMS_SPU_NOT_EXIST(600005,"spu不存在"),
    PMS_SKU_NOT_EXIST(600006,"sku不存在"),
    PMS_GOODSSOURCE_NOT_EXIST(600007,"产品找不到货源"),
    SUBMIT_ORDER_NO_ADOPT(600008,"下单校验没有通过"),
    PMS_SPU_TOO_LONG(600016,"款号日期过久"),

    /**
     * marketing
     */
    EMAIL_EXIST(7001, "邮箱已存在"),
    CHANNEL_EXIST(7002, "渠道已存在"),
    OBJECT_NOT_EXIST(7003, "对象不存在"),

    /**
     * spotify
     */
    CLIENT_ID_ERROR(8001, "clientId不正确"),
    TIMESTAMP_INVALID(8002, "timestamp无效"),


    /**
     * external-api
     */
    DING_TALK_CONFIG_NOT_FOUND(9001, "不存在钉钉机器人配置"),
    
    /**
     * wms
     */
    WMS_DATA_ACCESS_FAILED(8000047,"数据权限获取失败"),
    WMS_DATA_PERMISSION_ERROR(80000, "当前用户没有配置数据权限，操作失败！"),
    WMS_STORAGE_LOCATION_CODE_REPEAT(800001, "库位编码重复"),
    WMS_STORAGE_LOCATION_AREA_CODE_REPEAT(800002, "库区编码重复"),
    WMS_EXPORT_ERROR(800003, "导出excel错误"),
    WMS_GENERATE_ID_FAILED(800004, "生成序列ID失败"),
    WMS_STORAGE_ACCOUNT_ERROR(800005, "库存账操作错误(收货月台对应的虚拟库位没有查询到对应sku)"),
    WMS_LOCK_STOCK_FAIL(800006, "锁定库存失败"),
    WMS_SI(800007, "物流已签收"),
    WMS_RE(800008, "物流已拒收"),
    WMS_STORAGE_NOT_FOUND(8000007, "未找到库存"),
    WMS_DELIVER_BILL_USE_EXIST(8000008, "该商品已重新分配"),
    WMS_PARCEL_NOT_EXIST(8000009, "包裹不存在"),
    WMS_LOGISTIC_PARCEL_NOT_EXIST(8000010, "物流单单对应发运包裹不存在或该包裹已发运"),
    WMS_LOGISTIC_CHANNEL_INCONSISTENT(800011, "物流渠道不一致"),
    WMS_PKG_NOT_FOUND(800012, "未找到该PKG或单据状态不匹配"),
    WMS_SHELVE_BILL_MIX_ERROR(8000013, "上架失败(不允许混放)"),
    WMS_SHELVE_BILL_ERROR(8000014, "上架失败"),
    WMS_OBJECT_NOT_POINT(8000015, "没有查询到该单号下的到货单信息"),
    WMS_PARCEL_QUANTITY_LARGER_THAN_CANCEL(8000016, "包裹中商品超出取消数量"),
    WMS_PARCEL_STATUS_NORMAL(8000017, "包裹单状态正常，不需要强制发货"),
    WMS_STORAGE_LOCATION_CODE_NOT_FOUND(8000018, "找不到库区"),
    WMS_CROSS_DOCKING_QUANTITY_NOT_NULL(8000019, "越库数量不能为0"),
    WMS_LOCATION_STORAGE_NOT_ENOUGH(8000020, "库存不足"),
    WMS_PICK_WAVE_CREATE_FAILED(8000021, "波次创建失败"),
    WMS_DELIVER_NOT_FOUND(8000022, "未找到符合条件的订单"),
    WMS_PARCEL_STATUS_NOT_WEIGHT(8000023, "包裹状态非待称重，不能进行称重操作"),
    WMS_PKG_NOT_EXIST(8000024, "PKG单号不存在或该PKG已发运"),
    WMS_TOGETHER_NO_NOT_AVAILABLE(8000025, "无可用集货号"),
    WMS_TOGETHER_NO_IS_NULL(8000026, "集货号为空"),
    WMS_STOCK_NOT_ENOUGH(8000027, "仓库sku数量不足，占用失败"),
    WMS_UNWEIGHTED(8000028, "该批次码对应sku商品未称重，不允许上架！"),
    WMS_LOCATION_STOCK_NOT_NEGATIVE(8000029, "库位库存不允许为负"),
    WMS_PICK_WAY_UPDATE_FAIL(8000040, "拣货方式更新失败"),
    WMS_DELIVER_BILL_NOT_FOUND(8000041, "找不到对应的发货通知单"),
    WMS_PARCEL_DELIVER_BILL_CANCELED(8000042, "包裹对应的发货单存在发货取消"),
    WMS_DELIVER_CAN_NOT_CANCEL(8000043, "发货单无法取消"),
    WMS_PARCEL_CANCEL_AGAIN(8000044, "包裹存在二次取消,请重新校验"),
    WMS_PICK_WAVE_NOT_FINISH(8000045, "拣货波次还未完成"),
    WMS_PKG_IS_EMPTY(8000046, "PKG中没有添加发运包裹单"),
    WMS_PICK_ALREADY_FINISHED(8000047, "拣货已经完成"),
    WMS_UNEXPECTED_PARCEL_STATUS(8000048, "包裹状态异常"),
    WMS_PICK_USER_NOT_ALLOW(8000049, "用户非当前拣货单对应拣货人"),
    WMS_STORAGE_NOT_SHOP(8000050, "未找到有库存的店铺"),
    WMS_STORAGE_NOT_SHOP2(8000052, "所选店铺无当前sku规格库存"),
    WMS_STORAGE_NOT_SHOP3(8000053, "所选店铺部分无sku库存"),
    OPENID_NO_CORRESPONDING(8000100, "openID无对应关系"),
    PERSONNEL_NOT_EXIST_MARKETING(8000101, "成员不存在营销组织"),
    PHONE_NO_CORRESPONDING_PERSONNEL(8000102, "手机号无对应成员"),
    KEY_IS_NOT_CONFIGURED(8000103, "企业未配置微信相关秘钥"),
    /**
     * ferp
     */
    // code为900000的都是重新放入队列
    FERP_UPDATE_ACC_STOCK_SITE_DETAIL_FAIL(900000,"库存地点记账明细变更失败，重新放入队列！"),
    FERP_QUANTITY_MINUS(900000,"数量为负数，重新放入队列！"),
    FERP_SELLQUANTITY_MINUS(900000,"可销售数量为负数，重新放入队列！"),
    FERP_UNAVAILABLEQUANTITY_MINUS(900000,"不可用数量为负数，重新放入队列！"),
    FERP_NOT_HAVE_STOCKSITE(900000,"没有找到库存地点"),
    FERP_STOCK_UPDATE_ZERO(900000,"库存变更失败，重新放入队列"),
    FERP_STOCKCHANGE_IS_NULL(900001,"库存扣减参数为空"),
    FERP_STOCK_NOT_ENOUGH(900002,"sku库存不足"),
    FERP_STOCK_UPDATE_FAIL(900003,"sku库存成本更新失败！"),

    POS_API_PUBLIC_KEY_FAIL(1000001,"密钥解析错误！"),
    ;

    private Integer code;
    private String msg;

    ReturnCode(Integer code, String msg) {
        this.code = code;
        this.msg = msg;
    }

    public Integer getCode() {
        return code;
    }

    public String getMsg() {
        return msg;
    }
}
